using Pay.TO;
using System;
using System.Collections.Generic;

namespace Pay.Data
{
    /// <summary>
    /// 赛事表
    /// </summary>
    [Serializable]
    public class Playing
    {
        public Playing() {
            UserGuessPlayingHiss = new List<UserGuessPlayingHis>();
        }
        /// <summary>
        /// 赛事Id
        /// [主键：√]
        /// [长度：19]
        /// [不允许为空]
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 活动类型
        /// [长度：10]
        /// [不允许为空]
        /// </summary>
        public EActivityType ActivityType { get; set; }

        /// <summary>
        /// 比赛模式（枚举）
        /// [长度：10]
        /// [不允许为空]
        /// </summary>
        public EPlayType PlayType { get; set; }

        /// <summary>
        /// 比赛时间
        /// [长度：23，小数位数：3]
        /// [不允许为空]
        /// </summary>
        public DateTime PlayTime { get; set; }

        /// <summary>
        /// 参与截止时间
        /// [长度：23，小数位数：3]
        /// [不允许为空]
        /// </summary>
        public DateTime ParticipationEndTime { get; set; }

        /// <summary>
        /// 主队Id
        /// [长度：19]
        /// [不允许为空]
        /// </summary>
        public long HomeTeamId { get; set; }

        /// <summary>
        /// 客队Id
        /// [长度：19]
        /// [不允许为空]
        /// </summary>
        public long GuestTeamId { get; set; }

        /// <summary>
        /// 获胜队Id（平局则为0）
        /// [长度：19]
        /// </summary>
        public long? WinTeamId { get; set; }

        /// <summary>
        /// 主队
        /// </summary>
        public virtual PlayingTeam HomeTeam { get; set; }

        /// <summary>
        /// 客队
        /// </summary>
        public virtual PlayingTeam GuestTeam { get; set; }

        /// <summary>
        /// 获胜队
        /// </summary>
        public virtual PlayingTeam WinTeam { get; set; }

        /// <summary>
        /// 用户竞猜记录
        /// </summary>
        public virtual ICollection<UserGuessPlayingHis> UserGuessPlayingHiss { get; set; }

    }
}
